package model;

import javax.validation.constraints.*;

public class DataBase {

	
	private int id;
	@NotNull(message="数据库名不能为空！")
	private String dbName;
	
	@NotNull(message="用户名不能为空！")
	private String userName;
	@NotNull(message="密码不能为空")
	@Size(min=1,max=100,message="密码长度必须在1-100之间！")
	private String password;
	@NotNull(message="url不能为空！")
	private String url;
	private String driver;
	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public DataBase(int id, String dbName, String userName, String password,
			String url,String driver) {
		super();
		this.id = id;
		this.dbName = dbName;
		this.userName = userName;
		this.password = password;
		this.url = url;
		this.driver=driver;
	}

	public DataBase() {
		super();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public String toString() {
		return "DataBase [id=" + id + ", dbName=" + dbName + ", userName="
				+ userName + ", password=" + password + ", url=" + url
				+ ", driver=" + driver + "]";
	}

	
	
	
}
